///: Replication script for: Gender and Ambition Among Potential Law Clerks
///: Authors: Alex Badas and Katelyn E. Stauffer
///: Journal: Journal of Law and Courts 

clear

log using "BadasStaufferJLCreplication.log", replace

use "BadasStauffer-GenderClerkAmbition-JLC-DATAFILE.dta"

///: Table 1 
///: Models of ambition for each institution 
logit SC_ambition i.Female   White LawYear ClerkWork TotalGroup Age ideology Legal_Inter  i.CatRank
margins,dydx(Female) plot
eststo SC

logit COA_ambition i.Female  White LawYear ClerkWork TotalGroup Age ideology Legal_Inter  i.CatRank
margins Female

eststo COA

logit DCT_ambition i.Female  White LawYear  ClerkWork TotalGroup Age ideology Legal_Inter i.CatRank
margins, dydx(Female) plot

eststo DCT

logit SSC_ambition i.Female White LawYear  ClerkWork TotalGroup Age ideology Legal_Inter  i.CatRank
margins, dydx(Female) plot

eststo SSC


logit OSC_ambition i.Female White LawYear  ClerkWork TotalGroup Age ideology Legal_Inter  i.CatRank
margins, dydx(Female) plot

eststo OSC


  
  
///:Table 2
///: Models for Qualification at each institution
reg qualified_SC Female White LawYear ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.Cat
eststo qsc

reg qualified_COA Female White LawYear ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.CatRank
eststo qcoa

reg qualified_DCT Female White LawYear ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.CatRank
eststo qdct

reg qualified_SSC Female White LawYear ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.CatRank
eststo qssc

reg qualified_OSC Female White LawYear ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.CatRank
eststo qosc

esttab qsc qcoa qdct qssc qosc using clerktable.tex, se label replace booktabs ///
  alignment(D{.}{.}{-1})                         ///
  title(OLS Regression: Perceived Qualification\label{Qualifications})
  
///: Table 3
///: Encouragement
reg Encouragement i.Female White LawYear ClerkWork TotalGroup Age ideology Legal_Inter i.CatRank


eststo encouragement

  
 ///: Table 4 
 ///: Interaction Qualification and Gender
 logit SC_ambition i.Female##c.qualified_SC  White LawYear ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.CatRank
margins, dydx(Female) at(qualified_SC=(1(1)4)) plot
eststo SC_q

logit COA_ambition i.Female##c.qualified_COA White LawYear ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.CatRank
margins, dydx(Female) at(qualified_COA=(1(1)4)) plot

eststo COA_q

logit DCT_ambition i.Female##c.qualified_DCT White LawYear  ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.CatRank
margins, dydx(Female) at(qualified_DCT=(1(1)4)) plot

eststo DCT_q

logit SSC_ambition i.Female##c.qualified_SSC White LawYear ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.CatRank
margins, dydx(Female) at(qualified_SSC=(1(1)4)) plot

eststo SSC_q


logit OSC_ambition i.Female##c.qualified_OSC White LawYear ClerkWork TotalGroup Age ideology Legal_Inter Encouragement i.CatRank
margins, dydx(Female) at(qualified_OSC=(1(1)4)) plot

eststo OSC_q

  
 ///: Table 5 
 ///: Interaction encouragement and gender
 logit SC_ambition i.Female##c.Encouragement qualified_SC  White LawYear ClerkWork TotalGroup Age ideology Legal_Inter i.CatRank
margins, dydx(Female) at(Encouragement=(0(.1)1)) plot(recast(line) recastci(rarea))
eststo SC_encour

logit COA_ambition i.Female##c.Encouragement qualified_COA White LawYear ClerkWork TotalGroup Age ideology Legal_Inter i.CatRank
margins, dydx(Female) at(Encouragement=(0(.1)1)) plot(recast(line) recastci(rarea))

eststo COA_encour

logit DCT_ambition i.Female##c.Encouragement qualified_DCT White LawYear  ClerkWork TotalGroup Age ideology Legal_Inter i.CatRank
margins, dydx(Female) at(Encouragement=(0(.1)1)) plot(recast(line) recastci(rarea))

eststo DCT_encour

logit SSC_ambition i.Female##c.Encouragement qualified_SSC White LawYear ClerkWork TotalGroup Age ideology Legal_Inter i.CatRank 
margins, dydx(Female) at(Encouragement=(0(.1)1)) plot(recast(line) recastci(rarea))

eststo SSC_encour


logit OSC_ambition i.Female##c.Encouragement qualified_OSC White LawYear ClerkWork TotalGroup Age ideology Legal_Inter i.CatRank
margins, dydx(Female) at(Encouragement=(0(.1)1)) plot(recast(line) recastci(rarea))

eststo OSC_encour

clear

log close
